<!DOCTYPE html>
<html lang="zh-CN" xmlns="http://www.w3.org/1999/xhtml"
	xmlns:th="http://www.thymeleaf.org">
<head th:replace="web/common/header :: header(~{::title},~{::link})">
<link rel="stylesheet"
	th:href="@{/web/vendor/bootstrap/dist/css/bootstrap.css(v=${vtimestamp})}">
<link rel="stylesheet"
	th:href="@{/web/css/mainInfo.css(v=${vtimestamp})}">
<link rel="stylesheet"
	th:href="@{/web/css/video/creatVideo.css(v=${vtimestamp})}">
<link rel="stylesheet"
	th:href="@{/web/css/missionList/missionhome.css(v=${vtimestamp})}">
<title>班集-班集工具</title>
<meta name="referrer" content="never">
</head>
<body>
	<div id="mainInfo">
		<!--top_nav_bar S -->
		<th:block th:replace="web/common/top_nav_bar :: top_bar" />
		<!--top_nav_bar E -->
		<div class="infoContent">
			<!--left_nav_bar S -->
			<th:block th:replace="web/common/left_nav_bar :: left_bar" />
			<!--left_nav_bar E -->
			<div class="infoRightBar pull-right">
				<div class="tab-content">
					<div class="tab-pane active account-bind-panel" role="tabpanel"
						id="account-bind">
						<div class="missionListBox">
							<span>查询教务系统成绩</span>

							<form id="uploadForm" class="uploadForm"
								action="/web/other/qingguo"
								method="post">
								<input type="hidden" value="F94074A9821395402CDAC85171F7E3DF" name="schoolIdentity">
						  		<input type="hidden" value="0" name="s_Id">
						  		<input type="hidden" value="B7A561993EB57FE0E83B06D362EDF660" name="identity">
								<div class="form-group">
									<div class="inputRightSide">
										<input name="s_n" type="text"
											placeholder="请输入您的学号" class="form-control">
									</div>
									<label class="control-label"></label>
								</div>
								<div class="form-group" style="align-items:flex-start">
									<div class="inputRightSide">
										<input name="p_d" type="password" 
											placeholder="请输入您的密码" class="form-control">
									</div>
									<label class="control-label"></label>
								</div>
								<div class="form-group" style="align-items:flex-start">
									<div class="inputRightSide">
										<input name="v_c" type="text" id="code" placeholder="请输入验证码" class="form-control">
									</div>
									<label class="control-label"></label>
									
									<img id="validateCode" alt="图片验证码" src="/web/other/qingguo/code">
								</div>

						
								<div class="form-group">
									<div class="inputRightSide">
										<div class="rightBox" style="height: 50px; ">
											<select id="type" name="b_y" class="selectOption">
												<option value="">请选择学年</option>
												<option value="2018">2018学年</option>
												<option value="2017">2017学年</option>
												<option value="2016">2016学年</option>
												<option value="2015">2015学年</option>
												<option value="2014">2014学年</option>
											</select>
										</div>
										<label class="control-label"></label>
									</div>
								</div>
								<div class="form-group">
									<div class="inputRightSide">
										<div class="rightBox" style="height: 50px;">
											<select  name="t_m" class="selectOption">
												<option value="">请选择学期</option>
												<option value="1">上半学期</option>
												<option value="2">下半学期</option>
											</select>
										</div>
										<label class="control-label"></label>
									</div>
								</div>
									
								<div class="btnformgroup">
									<button id="publish" type="button" class="btn btn-default">查询成绩</button>
								</div>
							</form>
							 <div class="missionListBox">
		                        <span>我的成绩单</span>
		                        <ul class="missionList" style="display: none;">
		                        	
		                        </ul>
		                        <!--暂无数据-->
		                        <div class="noDataBox">
		                            <img src="/web/image/accountpage/noData.png" alt="">
		                            <p>暂无数据</p>
		                        </div>
                   		     </div>

						</div>
					</div>
				</div>
			</div>
		</div>
		<!--footer S -->
		<th:block th:replace="web/common/footer :: footer" />
		<!--footer E -->

	</div>
	<p id="add_tan"   style="z-index:1000; height:50px;border-radius: 5px;padding:0 20px;background:rgba(224,82,68,.7);position:fixed;top:68%;margin-top: -25px;left:43%;margin-left: -107px;font-size: 16px;color:#fff;line-height:50px; display:none"></p>	
</body>
<script th:src="@{/web/vendor/jquery/dist/jquery.js(v=${vtimestamp})}"></script>
<script
	th:src="@{/web/vendor/bootstrap/dist/js/bootstrap.js(v=${vtimestamp})}"></script>
<script type="text/javascript">
	$("#validateCode").click(function() {
		$(this).attr('src', '/web/other/qingguo/code?' + Math.random());
	});
	$("#publish").click(function() {
		point("正在努力查询,请您耐心等候......");
		var formdata = $('#uploadForm').serialize();
		$.post("/web/other/qingguo", formdata, function(data) {
			var jsonData=JSON.parse(data);
			console.log(jsonData.errorCode);
			if (jsonData.errorCode == 0) {
				$('.noDataBox').hide();
				point("查询成功....您请看下方....");
				var list = jsonData.scoreList;
				drawScore(list);
			}else{
				$('.noDataBox').show();
				point(""+jsonData.message);
			}
		});
	})
	function drawScore(list) {
		var html = [];
		html.push('<li>');
		html.push('<span style="">课程编号</span>');
		html.push(' <span>课程名称</span>');
		html.push('<span>学分</span>');
		html.push('<span>考试成绩</span>');
		html.push('</li>');
		for (var i = 0; i < list.length; i++) {
			var data=list[i];
			html.push('<li>');
			html.push('<span>'+data.courseCode+'</span>');
			html.push('<span>'+data.courseName+'</span>');
			html.push('<span>'+data.credit+'</span>');
			html.push('<span>'+data.score+'</span>');
		}
		$('.missionList').html(html.join(''));
		$('.missionList').show();
	}
	
	function point(html){
		$('#add_tan').html(html);
		$('#add_tan').show().fadeOut(30000);
		setTimeout(function(){
		},5000);
	}
</script>
</html>